/*
  呼叫机器人到店铺
 */
const yunji = require('yi-yunji');

module.exports = {
    handler(req, res, next) {
        let doc = req.query;
        let param = {
            placeId:doc.placeId,
            type:'transport',
            target:doc.target
        };
        let message = '';
        yunji.RobotSchedule(param,(e,r)=>{
            if(r.errcode===0){
                message='呼叫机器人成功';
            }else{
                message='呼叫机器人失败';
            }
            res.reply({code:r.errcode,message:message,data:r.data})
        });
    }
};
